﻿#include <iostream>
#include <assert.h>
#include <map>
#include "singletonsafe.h"
///////////////////////////////////////////////////////////////////

class Test
{
public:
    Test()
    {
        std::cout << "创建对象" << std::endl;
        a = 100;
        m_val = {{"1234", "234"}};
    }
    int a;
    std::map<std::string, std::string> m_val;
};

using TestAgent = SingletonSafe<Test>;

int main()
{
    std::cout << "开始" << std::endl;
    TestAgent::get_mutable_instance()->a = 10;

    std::cout << "value:" << TestAgent::get_mutable_instance()->a << std::endl;
    return 0;
}